home *** CD-ROM | disk | FTP | other *** search
-
- LBAS Label Basic Translator Program
- ====================================
-
- Author: Jack Botner
- Date Written: November, 1982
- Last Updated: April, 1983
-
- This program was written at home on my own time and I am
- making it available for IBM Internal Use.
-
- Changes incorporated in version 12/82:
- - TAB character is now replaced with a blank so tabs may be
- present in the input.
- - "Between double quotes" flag turned off when a new line
- is begun, to limit scope of impact if closing " is missing.
- - Test inserted to make sure user has enough memory available.
- - Warning issued when output file will be overwritten.
- - Dependance on copy code control block storage definitions removed.
-
- Changes incorporated in version 04/83:
- - Fixed bug which caused program to fail "insufficient memory"
- when system has 512K or more storage.
- - Changed diskette I/O to block read and write, for up to 5 times
- improved run times.
- - Now allows "comment" lines where the first line is the "sun"
- symbol (also known as squashed bug symbol) (character 15 decimal).
- - Now ignores blank lines.
-
- PCLIB contents:
- LBAS EXEEXP is an EXPORTED version of LBAS.EXE.
- LBAS EXETBH is a B3277 binary version of LBAS.EXE.
- LBAS ASM is the PC-assembler source code (no tabs).
- LBAS DOC is this document, in plain text.
-
- Description:
- This program translates "label basic" programs into proper
- basic format acceptible to the PC Basic interpreter. It is
- written in assembly language for speedy execution.
-
- "Label basic" programs can be thought of as Basic programs
- with two differences:
- 1. There are no sequence numbers at the beginning of each
- statement.
- 2. Statement locations required by GOTO, GOSUB, ON ERROR, etc.
- are referenced by labels instead of statement numbers.
-
- "Label basic" programs have the following advantages:
- 1. The program can be entered and maintained using a PC
- full-screen editor.
- 2. The programmer need not concern himself with statement numbers
- and renumbering the program. Statements and subroutines are
- referenced symbolically.
-
- The disadvantage of "label basic", of course, is that you have to
- maintain the "label basic" source and run the program through the
- translator before it is useable by Basic. However, this translator
- runs quite fast, more than 10 times faster than the version
- which runs under the Basic interpreter. (Credit must be given
- to Dave Chess, who inspired the idea of label basic.)
-
- A label is defined as any non-blank string of characters beginning
- with an '!' symbol and containing at least one additional character.
- The maximum label length supported by this program is 16 characters
- (including the !). The program has room for 256 labelled state-
- ments. These limitations are somewhat arbitrary and could be
- changed if necessary. Labels found inside literals (i.e. between
- double quotes) will be ignored. Each statement can be "labelled"
- only once.
-
- The maximum file size which can be processed by this program is
- 64K bytes. This is because the entire file is read into one data
- segment of main storage for processing, thus avoiding having to
- read the file from disk twice. Therefore, your PC must have
- at least 96K of memory to run LBAS. If insufficient memory is
- available, the program will terminate with an error message.
-
- Files used as input to this program should have a file extension
- of "LBA". (This can be overridden, but the program will be easier
- to run with the default file extension.) The output file will
- be created with the same filename, and given a file extension of
- "BAS". This will be in a format compatible with Basic ASCII files.
- The output file will always be created on the same disk as the
- input file.
-
- To run the program, enter (from DOS):
-
- LBAS <d:>filename<.filext>
-
- where d: overrides the default disk drive if necessary, and
- .filext overrides the default file extension (.LBA). If you
- omit the filename on the command, you will be prompted for it.
-
- Each TAB character is replaced with a blank, so tabs may be
- present in the input file. No attempt is made to maintain
- original spacing of the lines, however.
-
- To report any problems or suggestions, please contact the
- author at VM TOROLAB(BOTNER).
-
- the li